import QtQuick 1.0

Rectangle {
	property alias sliderY: handle.y
	signal released()
	signal yChanged()


	id: slider
	height: parent.height
	gradient: Gradient {
		GradientStop {position: 0; color: "transparent"}
		GradientStop {position: 0.99; color: "transparent"}
	}



	Image {
		id: handle
		anchors.right: parent.right
		source: "qrc:///qml/images/slider.png"
		scale:  2
		Connections{
			onYChanged: slider.yChanged()
		}

		MouseArea{
			Connections{
				onReleased: slider.released()
			}

			id:drager
			anchors.fill: parent
			drag.target: parent
			drag.axis: Drag.YAxis
			drag.minimumY: 0
			drag.maximumY: slider.height - handle.height
		}
	}


}
